<?php 
    $btnStart = '<span>Start</span>';
    if($this->current != $this->first){
        $lnkStart = $this->url(array('option'=>$this->component['name'],'control'=>$this->component['control'],'activity'=>$this->component['activity'],'page'=>$this->first));
        $btnStart = '<a href="' . $lnkStart . '" title="Start">Start</a>';
    }
    
    
    $btnPrev = '<span>Prev</span>';
    if(isset($this->previous)){
        $lnkPrev = $this->url(array('option'=>$this->component['name'],'control'=>$this->component['control'],'activity'=>$this->component['activity'],'page'=>$this->previous));
        $btnPrev = '<a href="' . $lnkPrev . '" title="Prev">Prev</a>';
    }
    
    
    $btnNext = '<span>Next</span>';
    if(isset($this->next)){
        $lnkNext = $this->url(array('option'=>$this->component['name'],'control'=>$this->component['control'],'activity'=>$this->component['activity'],'page'=>$this->next));
        $btnNext = '<a href="' . $lnkNext . '" title="Next">Next</a>';
    }
    
    $btnEnd = '<span>End</span>';
    if($this->current != $this->last){
        $lnkEnd = $this->url(array('option'=>$this->component['name'],'control'=>$this->component['control'],'activity'=>$this->component['activity'],'page'=>$this->last));
        $btnEnd = '<a href="' . $lnkEnd . '" title="End">End</a>';
    }
    
    foreach ($this->pagesInRange as $val){
        $lnkPage = $this->url(array('option'=>$this->component['name'],'control'=>$this->component['control'],'activity'=>$this->component['activity'],'page'=>$val));
        if($this->current != $val){
            $strPage .= '<a href="' . $lnkPage . '" title="page ' . $val  . '">' . $val  . '</a>';
        }else{
            $strPage .= '<span>' . $val  . '</span>';
        }
    }
    
    $currentPage = 'Page ' . $this->current . ' Of ' . $this->last;

?>
                                                        
<div class="button2-right">
    <div class="start">     
        <?php echo $btnStart;?> 
    </div>
</div>

<div class="button2-right">
    <div class="prev">
        <?php echo $btnPrev;?>
    </div>
</div>

<div class="button2-left">
    <div class="page">
        <?php echo $strPage;?>  
    </div>
</div>

<div class="button2-left">
    <div class="end">
        <?php echo $btnNext;?>
    </div>
</div>

<div class="button2-left">
    <div class="end">
        <?php echo $btnEnd;?>   
</div>
</div>
<div class="limit">
    <?php echo $currentPage;?>
    </div>
                                             